aaron.ballman added a comment.

Thank you for working on this!



================
Comment at: 
clang-tools-extra/test/clang-tidy/checkers/readability-braces-around-statements-attributes.cpp:7-14
+  if (b) [[likely]] {
+    // CHECK-FIXES-NOT: if (b) { {{[[][[]}}likely{{[]][]]}} {
+    return;
+  }
+  if (b) [[unlikely]] {
+    // CHECK-FIXES-NOT: if (b) { {{[[][[]}}unlikely{{[]][]]}} {
+    return;
----------------
Can you also add tests that show we do the correct thing for:
```
if (b) [[likely]]
  return;
if (b) [[unlikely]]
  return;
```
where there were no braces involved? We should ensure that it wants to insert 
the braces after the attribute.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105479

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to