[LLVMbugs] [Bug 13045] New: Provide better diagnostics for duplicate includes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 7 04:59:19 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=13045

             Bug #: 13045
           Summary: Provide better diagnostics for duplicate includes
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: benny.kra at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


For a case like this, which can come up when include guards are missing/broken:

$ cat t.h
void foo(int x = 0);

$ cat t.cpp
#include "t.h"
#include "t.h"

we emit a slightly confusing error message:

$ clang t.cpp
In file included from t.cc:2:
./t.h:1:14: error: redefinition of default argument
void foo(int x = 0);
             ^   ~
./t.h:1:14: note: previous definition is here
void foo(int x = 0);
             ^   ~
1 error generated.

It would be nice to provide some guidance here, though I'm not sure how it
could look.

-- 
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