[PATCH] D55131: [CTU] Add more lit tests and better error handling

Aleksei Sidorin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 1 13:15:27 PST 2018


a_sidorin added a comment.

Hi Gabor,
Please find my comments inline.



================
Comment at: lib/CrossTU/CrossTranslationUnit.cpp:251
+      cast_or_null<FunctionDecl>(Importer.Import(const_cast<FunctionDecl *>(FD)));
+  if (!ToDecl) {
+    return llvm::make_error<IndexError>(index_error_code::failed_import);
----------------
Conditionals with a single-line body don't require braces.


================
Comment at: test/Analysis/Inputs/ctu-other.c:1
+enum B {x = 42,l,s};
+
----------------
Please clang-format the new files.


================
Comment at: test/Analysis/Inputs/ctu-other.c:6
+  int b;
+} foobar;
+
----------------
Please use a consistent naming style across the file. There are names starting with capital, having underscores and written like this.


Repository:
  rC Clang

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

https://reviews.llvm.org/D55131





More information about the cfe-commits mailing list