[PATCH] D101776: Work around an unfortunate macro in the Windows SDK

Zachary Henkel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 4 06:41:25 PDT 2021


zahen updated this revision to Diff 342715.
zahen added a comment.

Updated the macro based on Aaron's suggestion.  clang-formatted the function.


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

https://reviews.llvm.org/D101776

Files:
  clang/include/clang/Analysis/CFG.h


Index: clang/include/clang/Analysis/CFG.h
===================================================================
--- clang/include/clang/Analysis/CFG.h
+++ clang/include/clang/Analysis/CFG.h
@@ -1389,13 +1389,12 @@
   // Member templates useful for various batch operations over CFGs.
   //===--------------------------------------------------------------------===//
 
-  template <typename CALLBACK>
-  void VisitBlockStmts(CALLBACK& O) const {
+  template <typename Callback> void VisitBlockStmts(Callback &O) const {
     for (const_iterator I = begin(), E = end(); I != E; ++I)
       for (CFGBlock::const_iterator BI = (*I)->begin(), BE = (*I)->end();
            BI != BE; ++BI) {
         if (Optional<CFGStmt> stmt = BI->getAs<CFGStmt>())
-          O(const_cast<Stmt*>(stmt->getStmt()));
+          O(const_cast<Stmt *>(stmt->getStmt()));
       }
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101776.342715.patch
Type: text/x-patch
Size: 861 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210504/83fdb762/attachment.bin>


More information about the cfe-commits mailing list