Index: clang/lib/AST/Interp/ByteCodeStmtGen.cpp =================================================================== --- clang/lib/AST/Interp/ByteCodeStmtGen.cpp +++ clang/lib/AST/Interp/ByteCodeStmtGen.cpp @@ -221,7 +221,7 @@ template bool ByteCodeStmtGen::visitDeclStmt(const DeclStmt *DS) { for (auto *D : DS->decls()) { - if (isa(D)) + if (isa(D)) continue; const auto *VD = dyn_cast(D); Index: clang/test/AST/Interp/literals.cpp =================================================================== --- clang/test/AST/Interp/literals.cpp +++ clang/test/AST/Interp/literals.cpp @@ -768,3 +768,16 @@ static_assert(S3{}.foo(), ""); static_assert(!S3{}.foo(), ""); } + +#if __cplusplus >= 201402L +constexpr int ignoredDecls() { + static_assert(true); + struct F { int a; }; + enum E { b }; + using A = int; + typedef int Z; + + return F{12}.a; +} +static_assert(ignoredDecls() == 12, ""); +#endif