[clang] 5db790f - [clang][Parse][NFC] Make ParseOpenMPAttributeArgs() AttrName const
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 28 10:38:11 PDT 2023
Author: Timm Bäder
Date: 2023-09-28T19:37:41+02:00
New Revision: 5db790f96c67f6b610e3d436d6d150f8748fda65
URL: https://github.com/llvm/llvm-project/commit/5db790f96c67f6b610e3d436d6d150f8748fda65
DIFF: https://github.com/llvm/llvm-project/commit/5db790f96c67f6b610e3d436d6d150f8748fda65.diff
LOG: [clang][Parse][NFC] Make ParseOpenMPAttributeArgs() AttrName const
Added:
Modified:
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDeclCXX.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index f599b8b98d031fb..0e969f341bbe19f 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -2893,7 +2893,7 @@ class Parser : public CodeCompletionHandler {
return false;
}
- void ParseOpenMPAttributeArgs(IdentifierInfo *AttrName,
+ void ParseOpenMPAttributeArgs(const IdentifierInfo *AttrName,
CachedTokens &OpenMPTokens);
void ParseCXX11AttributeSpecifierInternal(ParsedAttributes &Attrs,
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp
index 2c37ba800372346..d6e81317197bcae 100644
--- a/clang/lib/Parse/ParseDeclCXX.cpp
+++ b/clang/lib/Parse/ParseDeclCXX.cpp
@@ -4306,7 +4306,7 @@ Parser::TryParseCXX11AttributeIdentifier(SourceLocation &Loc,
}
}
-void Parser::ParseOpenMPAttributeArgs(IdentifierInfo *AttrName,
+void Parser::ParseOpenMPAttributeArgs(const IdentifierInfo *AttrName,
CachedTokens &OpenMPTokens) {
// Both 'sequence' and 'directive' attributes require arguments, so parse the
// open paren for the argument list.
@@ -4344,7 +4344,7 @@ void Parser::ParseOpenMPAttributeArgs(IdentifierInfo *AttrName,
// * An identifier (omp) for the attribute namespace followed by ::
// * An identifier (directive) or an identifier (sequence).
SourceLocation IdentLoc;
- IdentifierInfo *Ident = TryParseCXX11AttributeIdentifier(IdentLoc);
+ const IdentifierInfo *Ident = TryParseCXX11AttributeIdentifier(IdentLoc);
// If there is an identifier and it is 'omp', a double colon is required
// followed by the actual identifier we're after.
More information about the cfe-commits
mailing list