projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
096c033
)
[clang][parse] Avoid creating StmtVectors every loop iteration
author
Timm Bäder
<tbaeder@redhat.com>
Fri, 18 Nov 2022 13:46:16 +0000
(14:46 +0100)
committer
Timm Bäder
<tbaeder@redhat.com>
Fri, 18 Nov 2022 15:19:09 +0000
(16:19 +0100)
clang/lib/Parse/ParseStmt.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/Parse/ParseStmt.cpp
b/clang/lib/Parse/ParseStmt.cpp
index
8610abb
..
6a50f83
100644
(file)
--- a/
clang/lib/Parse/ParseStmt.cpp
+++ b/
clang/lib/Parse/ParseStmt.cpp
@@
-37,8
+37,8
@@
StmtResult Parser::ParseStatement(SourceLocation *TrailingElseLoc,
// We may get back a null statement if we found a #pragma. Keep going until
// we get an actual statement.
+ StmtVector Stmts;
do {
- StmtVector Stmts;
Res = ParseStatementOrDeclaration(Stmts, StmtCtx, TrailingElseLoc);
} while (!Res.isInvalid() && !Res.get());