aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorArthur Eubanks <aeubanks@google.com>2023-01-17 22:31:56 -0800
committerArthur Eubanks <aeubanks@google.com>2023-01-17 22:35:21 -0800
commit39da55e8f548a11f7dadefa73ea73d809a5f1729 (patch)
treec77991acd5ef9cfe502b82d781569cf8b9a071b2 /clang/lib/Parse/ParseDecl.cpp
parent346e1c43a11b8af5a818dac321f83f043862c1ec (diff)
downloadllvm-39da55e8f548a11f7dadefa73ea73d809a5f1729.zip
llvm-39da55e8f548a11f7dadefa73ea73d809a5f1729.tar.gz
llvm-39da55e8f548a11f7dadefa73ea73d809a5f1729.tar.bz2
Revert "Diagnose extensions in 'offsetof'"
This reverts commit f1f0a0d8e8fdd2e534d9423b2e64c6b8aaa53aee. Causes crashes on $ echo 'typedef int a; void c() { __builtin_offsetof(struct {a b}, b); }' | bin/clang -cc1 -emit-llvm -o /dev/null - -x c
Diffstat (limited to 'clang/lib/Parse/ParseDecl.cpp')
-rw-r--r--clang/lib/Parse/ParseDecl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp
index 75937c0..56fe9c3 100644
--- a/clang/lib/Parse/ParseDecl.cpp
+++ b/clang/lib/Parse/ParseDecl.cpp
@@ -4972,7 +4972,7 @@ void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS,
DSC == DeclSpecContext::DSC_type_specifier,
DSC == DeclSpecContext::DSC_template_param ||
DSC == DeclSpecContext::DSC_template_type_arg,
- OffsetOfState, &SkipBody);
+ &SkipBody);
if (SkipBody.ShouldSkip) {
assert(TUK == Sema::TUK_Definition && "can only skip a definition");