capfredf updated this revision to Diff 537910.
capfredf added a comment.
move the comment up
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154382/new/
https://reviews.llvm.org/D154382
Files:
clang/lib/Interpreter/CodeCompletion.cpp
Index: clang/lib/Interpreter/CodeCompletion.cpp
===================================================================
--- clang/lib/Interpreter/CodeCompletion.cpp
+++ clang/lib/Interpreter/CodeCompletion.cpp
@@ -81,8 +81,6 @@
return Comps;
}
- std::string AllCodeText = "void __dummy(){\n" + Buffer.str();
-
// We need to wrap our input because we need `Sema::CodeCompleteOrdinaryName`
// to work on code from the REPL in a statement completion context. By
// default, `Sema::CodeCompleteOrdinaryName` thinks the input is a regular
c++
@@ -102,6 +100,7 @@
// Since top-level expressions are not supported, `foo` should not be an
// option. But in a REPL session, we should be allowed to use `foo` to make a
// statement like `foo + 84;`.
+ std::string AllCodeText = "void __dummy(){\n" + Buffer.str();
auto Lines = std::count(AllCodeText.begin(), AllCodeText.end(), '\n') + 1;
Index: clang/lib/Interpreter/CodeCompletion.cpp
===================================================================
--- clang/lib/Interpreter/CodeCompletion.cpp
+++ clang/lib/Interpreter/CodeCompletion.cpp
@@ -81,8 +81,6 @@
return Comps;
}
- std::string AllCodeText = "void __dummy(){\n" + Buffer.str();
-
// We need to wrap our input because we need `Sema::CodeCompleteOrdinaryName`
// to work on code from the REPL in a statement completion context. By
// default, `Sema::CodeCompleteOrdinaryName` thinks the input is a regular c++
@@ -102,6 +100,7 @@
// Since top-level expressions are not supported, `foo` should not be an
// option. But in a REPL session, we should be allowed to use `foo` to make a
// statement like `foo + 84;`.
+ std::string AllCodeText = "void __dummy(){\n" + Buffer.str();
auto Lines = std::count(AllCodeText.begin(), AllCodeText.end(), '\n') + 1;
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits