[cfe-commits] r45905 - /cfe/trunk/Parse/Parser.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 11 23:08:43 PST 2008
Author: lattner
Date: Sat Jan 12 01:08:43 2008
New Revision: 45905
URL: http://llvm.org/viewvc/llvm-project?rev=45905&view=rev
Log:
Fix a fixme, by only parsing extern "C" in C++ mode.
Modified:
cfe/trunk/Parse/Parser.cpp
Modified: cfe/trunk/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Parse/Parser.cpp?rev=45905&r1=45904&r2=45905&view=diff
==============================================================================
--- cfe/trunk/Parse/Parser.cpp (original)
+++ cfe/trunk/Parse/Parser.cpp Sat Jan 12 01:08:43 2008
@@ -389,8 +389,7 @@
// If the declspec consisted only of 'extern' and we have a string
// literal following it, this must be a C++ linkage specifier like
// 'extern "C"'.
- // FIXME: This should be limited to just C++/ObjectiveC++
- if (Tok.is(tok::string_literal) &&
+ if (Tok.is(tok::string_literal) && getLang().CPlusPlus &&
DS.getStorageClassSpec() == DeclSpec::SCS_extern &&
DS.getParsedSpecifiers() == DeclSpec::PQ_StorageClassSpecifier)
return ParseLinkage(Declarator::FileContext);
More information about the cfe-commits
mailing list