[PATCH] D110810: [clang][ASTImporter] Simplify code of attribute import [NFC].

Shafik Yaghmour via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 30 09:37:29 PDT 2021


shafik added inline comments.


================
Comment at: clang/lib/AST/ASTImporter.cpp:8456
 class AttrImporter {
-  Error Err = Error::success();
+  Error &Err;
   ASTImporter &Importer;
----------------
I am enthusiastic about reference members if we can somehow avoid them.

Can we use a struct to return both the `Err` and the pointer together? I don't like `std::pair` mainly b/c `first` and `second` are not meaningful. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110810



More information about the cfe-commits mailing list