https://bugs.llvm.org/show_bug.cgi?id=32848

            Bug ID: 32848
           Summary: -frewrite-includes asserts after file not found error:
                    `LastInclusionLocation.isInvalid() && "Another
                    inclusion directive was found before the previous one
                    " "was processed"' failed.
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: richard-l...@metafoo.co.uk
                CC: llvm-bugs@lists.llvm.org

Testcase:

#include "blah.h"
#include "blah.h"

$ ./bin/clang -E -frewrite-includes x.cpp
x.cpp:1:10: fatal error: 'blah.h' file not found
#include "blah.h"
         ^~~~~~~~
clang-4.0: tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp:184: virtual
void (anonymous
namespace)::InclusionRewriter::InclusionDirective(clang::SourceLocation, const
clang::Token &, llvm::StringRef, bool, clang::CharSourceRange, const
clang::FileEntry *, llvm::StringRef, llvm::StringRef, const clang::Module *):
Assertion `LastInclusionLocation.isInvalid() && "Another inclusion directive
was found before the previous one " "was processed"' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to