[PATCH] D64632: [clang-format] Don't detect call to ObjC class method as C++11 attribute specifier

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 12 08:47:25 PDT 2019


aaron.ballman added inline comments.


================
Comment at: clang/lib/Format/TokenAnnotator.cpp:389
   bool isCpp11AttributeSpecifier(const FormatToken &Tok) {
     if (!Style.isCpp() || !Tok.startsSequence(tok::l_square, tok::l_square))
       return false;
----------------
Clang has a feature flag to enable support for double-square bracket attributes in more than just C++ mode, and this is enabled by default in C2x mode. This check for `isCpp()` makes me suspect we may be doing the wrong thing here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64632





More information about the cfe-commits mailing list