alexfh requested changes to this revision.
This revision now requires changes to proceed.
================
Comment at: clang-rename/USRFindingAction.cpp:158
@@ +157,3 @@
+
+ FoundDecl = QualifiedName.empty() ? getNamedDeclAt(Context, Point)
+ : getNamedDeclFor(Context,
QualifiedName);
----------------
Merge this to the variable declaration.
================
Comment at: clang-rename/USRFindingAction.cpp:169
@@ -160,2 +168,3 @@
<< SymbolOffset << ").\n";
+ exit(1);
} else {
----------------
I'd better not use `exit()` in library code and try to find a way to signal the
error to the caller (e.g. make the function return a bool so that
HandleTranslationUnit doesn't do useless work, and use
ASTContext::getDiagnostics() to report errors; or add a separate callback, if
this doesn't work for some reason).
https://reviews.llvm.org/D24224
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits