[clang] [clang][Interp] Handle AttributedStmts (PR #66495)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 15 04:57:35 PDT 2023


================
@@ -628,6 +630,12 @@ bool ByteCodeStmtGen<Emitter>::visitAsmStmt(const AsmStmt *S) {
   return this->emitInvalid(S);
 }
 
+template <class Emitter>
+bool ByteCodeStmtGen<Emitter>::visitAttributedStmt(const AttributedStmt *S) {
+  // Ignore all attributes.
----------------
AaronBallman wrote:

Is this what we want to do for `[[assume]]`? We can do it this way: https://eel.is/c++draft/expr.const#5.8 but we can also do it better: https://eel.is/c++draft/expr.const#5.33

CC @erichkeane @cor3ntin

(We don't support assumptions yet, so I think the code is fine as-is, but I'm wondering if we want to add a FIXME here about `[[assume]]`. We should also see if any of our vendor statement attributes have UB we need to consider as well.)

https://github.com/llvm/llvm-project/pull/66495


More information about the cfe-commits mailing list