shivanshu3 marked 3 inline comments as done.
shivanshu3 added a comment.
Thank you very much for the review @rsmith!
Comment at: clang/lib/Sema/SemaDecl.cpp:15752-15754
+ bool AnonymousEnumEligible = getLangOpts().MSVCCompat &&
+
shivanshu3 updated this revision to Diff 305971.
shivanshu3 added a reviewer: rsmith.
shivanshu3 added a comment.
Addressing some of rsmith's comments:
- Add a test case where an enum variable is declared in the same scope as the
enum definition
- Fix a style issue with parentheses
- Simplify
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaDecl.cpp:15545-15546
+// is only used for C code.
+if (getLangOpts().MSVCCompat && (Kind == TTK_Enum) && Previous.empty() &&
+(TUK == TUK_Reference)) {
+ LookupResult TypedefEnumLookup(*this, Name,
shivanshu3 created this revision.
shivanshu3 added reviewers: zahen, tiagoma, rnk, hans.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
shivanshu3 requested review of this revision.
Goal: Clang should be able to parse the following code with
'-fms-compatibility' because