Skip to content

dump-minimization-hints prints negative-size ranges #151976

@emaxx-google

Description

@emaxx-google

When executing Clang with -dump-minimization-hints, a logically incorrect output is created: a range whose to has a smaller line number than from:

//--- 70C.h
template <typename >
struct qg;
template <typename >
struct qg;
template <typename T>
qg(T) -> qg<T>;

//--- DMA.cppmap
module "z" {
header "FM7.h"
}

//--- FM7.h
#include "70C.h"


//--- NS4.cc
#include "70C.h"


//--- Makefile
2PI.o: 5JZ.pcm
	rm -rf $@
	$(CLANG) -frandom-seed=2PI.o -iquote . -fmodule-name=g -Xclang=-fno-cxx-modules -Xclang=-fmodule-map-file-home-is-cwd -fmodules -fno-implicit-modules -fno-implicit-module-maps -Xclang=-fmodule-file=5JZ.pcm -fmodule-map-file=DMA.cppmap -std=gnu++20 -nostdinc++ -nostdlib++ -c NS4.cc -o 2PI.o $(EXTRA_CFLAGS)
5JZ.pcm:
	rm -rf $@
	$(CLANG) -frandom-seed=5JZ.pcm -iquote . -fmodule-name=z -fmodule-map-file=DMA.cppmap -Xclang=-fno-cxx-modules -Xclang=-fmodule-map-file-home-is-cwd -xc++ -Xclang=-emit-module -fmodules -fno-implicit-modules -fno-implicit-module-maps -std=gnu++20 -nostdinc++ -nostdlib++ -c DMA.cppmap -o 5JZ.pcm $(EXTRA_CFLAGS)
.PHONY: clean
clean:
	find . \( -name '*.pcm' -o -name '*.o' \) -delete

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:frontendLanguage frontend issues, e.g. anything involving "Sema"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions