http://llvm.org/bugs/show_bug.cgi?id=8654
Summary: clang-as-a-library's preprocessor doesn't trigger
Elif, Else and Endif callbacks at the right times
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Created an attachment (id=5806)
--> (http://llvm.org/bugs/attachment.cgi?id=5806)
Proposed fix
'dsturtevant' on IRC pointed out that PPCallbacks::Elif, Else and Endif aren't
called if they terminate a preprocessor block which is being skipped due to an
earlier #if or #elif not matching. For instance:
#if 0 // If()
#else // Else() MISSED
#endif // Endif()
#if 0 // If()
#elif 1 // Elif() MISSED
#else // Endif()
#if 0 // If()
#endif // Endif() MISSED
I've put together a patch which should fix this but it's untested (there don't
seem to be any tests of the PPCallbacks stuff to model such a test on).
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs