[LLVMbugs] [Bug 7944] New: diagnostic missing source location when used with macro

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Aug 19 16:22:34 PDT 2010


           Summary: diagnostic missing source location when used with
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: nlewycky at google.com
                CC: llvmbugs at cs.uiuc.edu

This unassuming program has a common syntax error:

  #define MACRO(x) x

  struct B {
    int f() { return true; }
  struct A {
    B* b() { return new B; }
  void g() {
    A a;

but the diagnostic is missing important information:

  $ clang++ -fsyntax-only x.cc
  error: base of member reference has function type 'B *()'; perhaps you meant
        call this function with '()'?
  1 error generated.

No source file, no line number, no caret highlighting. If you remove the macro
then it works just fine.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list