This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf4a6842c5a4d: [clang][Interp] Reject invalid declarations
and expressions (authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137386/new/
https://reviews.llvm.org/D137386
___
cfe-commits mailing lis
tbaeder added a comment.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137386/new/
https://reviews.llvm.org/D137386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaeder updated this revision to Diff 474727.
tbaeder marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137386/new/
https://reviews.llvm.org/D137386
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/test/AST/Interp/functions.cpp
Index: clang/test/A
tbaeder updated this revision to Diff 474726.
tbaeder marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137386/new/
https://reviews.llvm.org/D137386
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/test/AST/Interp/functions.cpp
Index: clang/test/A
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1235-1236
bool ByteCodeExprGen::visitDecl(const VarDecl *VD) {
- Optional VarT = classify(VD->getType());
+ if (VD->isInvalidDecl())
+return false;
Because we can't
tbaeder marked an inline comment as done.
tbaeder added inline comments.
Comment at: clang/test/AST/Interp/functions.cpp:88-97
+constexpr int invalid() {
+ // Invalid expression in visit().
+ while(huh) {}
+}
+
+constexpr void invalid2() {
+ int i = 0;
aaron.b
tbaeder updated this revision to Diff 474172.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137386/new/
https://reviews.llvm.org/D137386
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/test/AST/Interp/functions.cpp
Index: clang/test/AST/Interp/functions.cpp
==
aaron.ballman added inline comments.
Comment at: clang/test/AST/Interp/functions.cpp:88-97
+constexpr int invalid() {
+ // Invalid expression in visit().
+ while(huh) {}
+}
+
+constexpr void invalid2() {
+ int i = 0;
There should definitely be diagnostics here
tbaeder updated this revision to Diff 473939.
tbaeder added a comment.
Tried to find an example for an invalid declaration but couldn't even manage to
find one :|
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137386/new/
https://reviews.llvm.org/D137386
Files:
clang/lib/AST/Interp/B
aaron.ballman added a comment.
I'd like to see some test coverage for what these changes catch that wasn't
caught before. On its face, this seems reasonable in that we don't want to
bother running the interpreter (further) once we know we've hit an expression,
declaration, or type that's not va
tbaeder created this revision.
tbaeder added reviewers: aaron.ballman, erichkeane, tahonermann, shafik.
Herald added a project: All.
tbaeder requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
I'm not really sure if this is the right thing to d
12 matches
Mail list logo