[PATCH] D59467: [clang] Adding the Likely Attribute from C++2a to AST

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Mar 23 14:48:10 PDT 2019


lebedev.ri added inline comments.


================
Comment at: clang/include/clang/AST/Stmt.h:1795
 
+  BranchHint getBranchHint() const { return IfStmtBits.Hint; }
+
----------------
`lib/AST/TextNodeDumper.cpp` will need to be taught to print it too
(and astdumper test coverage to show that)


================
Comment at: clang/lib/Serialization/ASTReaderStmt.cpp:225
   bool HasInit = Record.readInt();
+  S->setBranchHint(static_cast<BranchHint>(Record.readInt()));
 
----------------
[de]serialization code will too need tests
(not just that it is written and read, but that it happens successfully, losslessly)


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

https://reviews.llvm.org/D59467





More information about the cfe-commits mailing list