compnerd updated this revision to Diff 431084. compnerd added a comment. git-clang-format
CHANGES SINCE LAST ACTION https://reviews.llvm.org/D126093/new/ https://reviews.llvm.org/D126093 Files: clang/include/clang/Sema/DeclSpec.h clang/test/Sema/typerep-typespec.c Index: clang/test/Sema/typerep-typespec.c =================================================================== --- /dev/null +++ clang/test/Sema/typerep-typespec.c @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -std=c11 -x c %s -fsyntax-only -verify +// REQUIRES: asserts + +struct dispatch_object_s; +void _dispatch_queue_get_head(struct dispatch_object_s *volatile dq_items_head) { + (_Atomic __typeof__(dq_items_head) *)0; // expected-warning{{expression result unused}} +} Index: clang/include/clang/Sema/DeclSpec.h =================================================================== --- clang/include/clang/Sema/DeclSpec.h +++ clang/include/clang/Sema/DeclSpec.h @@ -516,7 +516,8 @@ SourceLocation getTypeSpecSatLoc() const { return TSSatLoc; } SourceLocation getTypeSpecTypeNameLoc() const { - assert(isDeclRep((TST) TypeSpecType) || TypeSpecType == TST_typename); + assert(isDeclRep((TST)TypeSpecType) || isTypeRep((TST)TypeSpecType) || + isExprRep((TST)TypeSpecType)); return TSTNameLoc; }
Index: clang/test/Sema/typerep-typespec.c =================================================================== --- /dev/null +++ clang/test/Sema/typerep-typespec.c @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -std=c11 -x c %s -fsyntax-only -verify +// REQUIRES: asserts + +struct dispatch_object_s; +void _dispatch_queue_get_head(struct dispatch_object_s *volatile dq_items_head) { + (_Atomic __typeof__(dq_items_head) *)0; // expected-warning{{expression result unused}} +} Index: clang/include/clang/Sema/DeclSpec.h =================================================================== --- clang/include/clang/Sema/DeclSpec.h +++ clang/include/clang/Sema/DeclSpec.h @@ -516,7 +516,8 @@ SourceLocation getTypeSpecSatLoc() const { return TSSatLoc; } SourceLocation getTypeSpecTypeNameLoc() const { - assert(isDeclRep((TST) TypeSpecType) || TypeSpecType == TST_typename); + assert(isDeclRep((TST)TypeSpecType) || isTypeRep((TST)TypeSpecType) || + isExprRep((TST)TypeSpecType)); return TSTNameLoc; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits