[cfe-commits] r69524 - /cfe/trunk/tools/clang-cc/CacheTokens.cpp
Chris Lattner
sabre at nondot.org
Sun Apr 19 00:32:10 PDT 2009
Author: lattner
Date: Sun Apr 19 02:32:03 2009
New Revision: 69524
URL: http://llvm.org/viewvc/llvm-project?rev=69524&view=rev
Log:
invalid directives can occur in #if 0 code, just pass them
through like other directives PTH doesn't care about. This
should fix rdar://6804029
Modified:
cfe/trunk/tools/clang-cc/CacheTokens.cpp
Modified: cfe/trunk/tools/clang-cc/CacheTokens.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/CacheTokens.cpp?rev=69524&r1=69523&r2=69524&view=diff
==============================================================================
--- cfe/trunk/tools/clang-cc/CacheTokens.cpp (original)
+++ cfe/trunk/tools/clang-cc/CacheTokens.cpp Sun Apr 19 02:32:03 2009
@@ -490,12 +490,15 @@
Tok.setIdentifierInfo(II);
tok::PPKeywordKind K = II->getPPKeywordID();
- assert(K != tok::pp_not_keyword);
ParsingPreprocessorDirective = true;
switch (K) {
+ case tok::pp_not_keyword:
+ // Invalid directives "#foo" can occur in #if 0 blocks etc, just pass
+ // them through.
default:
break;
+
case tok::pp_include:
case tok::pp_import:
case tok::pp_include_next: {
More information about the cfe-commits
mailing list