[PATCH] D30435: [clang-import-test] Lookup inside entities

Adrian Prantl via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 27 16:28:09 PST 2017


aprantl accepted this revision.
aprantl added a comment.
This revision is now accepted and ready to land.

A few stylistic issues inline.
It also wouldn't hurt to document what is being tested, either in the clang-import-test sources or in the input files. Otherwise this looks fine. More tests are always great!



================
Comment at: tools/clang-import-test/clang-import-test.cpp:213
+                                     ASTImporter &SourceToSearchImporter) {
+  if (SourceDC->isTranslationUnit()) {
+    return SearchTU;
----------------
Sort of an irrelevant nitpick, but we don't typically use curly braces on single statements.


================
Comment at: tools/clang-import-test/clang-import-test.cpp:228
+    if (SearchResultSize == 0) {
+      return nullptr; // couldn't find the name, so we have to give up
+    } else if (SearchResultSize > 1) {
----------------
->

// Couldn't find the name, so we have to give up.
return nullptr;


Repository:
  rL LLVM

https://reviews.llvm.org/D30435





More information about the cfe-commits mailing list