forked from OSchip/llvm-project
Only call TryAnnotateScopeToken when parsing C++.
- This improves -parse-noop of Carbon.h by +2%, and I believe compensates for the majority of the performance regression in r58913. llvm-svn: 60063
This commit is contained in:
parent
32ef8ceaa1
commit
762e77b55f
|
@ -426,7 +426,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS) {
|
|||
|
||||
// Only annotate C++ scope. Allow class-name as an identifier in case
|
||||
// it's a constructor.
|
||||
TryAnnotateScopeToken();
|
||||
if (getLang().CPlusPlus)
|
||||
TryAnnotateScopeToken();
|
||||
|
||||
switch (Tok.getKind()) {
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue