aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseStmt.cpp
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-04-11 17:58:56 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-04-13 10:14:49 +0100
commitaec3f951bf368d45b441554dac6e027678f9f3ee (patch)
treef67243737c4be7a12fbe6720871ff6017f7ed6bd /clang/lib/Parse/ParseStmt.cpp
parent265d87e46535bef2b718759ba39bb9fa30b1ef48 (diff)
downloadllvm-aec3f951bf368d45b441554dac6e027678f9f3ee.zip
llvm-aec3f951bf368d45b441554dac6e027678f9f3ee.tar.gz
llvm-aec3f951bf368d45b441554dac6e027678f9f3ee.tar.bz2
[clang] Type safety tweak for AttributeCommonInfo::Form
This patch adds static functions for constructing most AttributeCommonInfo::Forms. Direct construction is only retained where all fields (currently the syntax and spelling) are specified explicitly. This is a wash on its own. The purpose is to allow extra fields to be added to Form without disrupting all callers. In particular, it allows extra information to be stored about keywords without affecting non-keyword uses. No functional change intended. Differential Revision: https://reviews.llvm.org/D148104
Diffstat (limited to 'clang/lib/Parse/ParseStmt.cpp')
-rw-r--r--clang/lib/Parse/ParseStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index b6b87e3..c02ad90 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -2411,7 +2411,7 @@ StmtResult Parser::ParsePragmaLoopHint(StmtVector &Stmts,
ArgsUnion(Hint.ValueExpr)};
TempAttrs.addNew(Hint.PragmaNameLoc->Ident, Hint.Range, nullptr,
Hint.PragmaNameLoc->Loc, ArgHints, 4,
- ParsedAttr::AS_Pragma);
+ ParsedAttr::Form::Pragma());
}
// Get the next statement.