[PATCH] D60542: Add support for attributes on @implementations in Objective-C

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 11 10:27:30 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang/test/FixIt/fixit-pragma-attribute.cpp:19-20
 #pragma clang attribute push (__attribute__((annotate("subRuleContradictions"))), apply_to = any(variable, variable(is_parameter), function(is_member), variable(is_global)))
-// CHECK: fix-it:{{.*}}:{[[@LINE-1]]:108-[[@LINE-1]]:132}:""
-// CHECK: fix-it:{{.*}}:{[[@LINE-2]]:153-[[@LINE-2]]:172}:""
+// CHECK: fix-it:{{.*}}:{[[@LINE-1]]:153-[[@LINE-1]]:172}:""
+// CHECK: fix-it:{{.*}}:{[[@LINE-2]]:108-[[@LINE-2]]:132}:""
 
----------------
erik.pilkington wrote:
> aaron.ballman wrote:
> > Any idea why this swapped?
> Its because I added a new subject match rule in Attr.td, and the match rules enumerators are being stored in a DenseMap in Sema::ActOnPragmaAttributeAttribute. I think we should make that a std::map or something so this test is less fragile.
Ah, that makes sense, thank you. Yeah, using an ordered container may be a better approach to reduce fragility.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60542/new/

https://reviews.llvm.org/D60542





More information about the cfe-commits mailing list