[PATCH] D70149: [C-index] Fix annotate-deep-statements test in Debug target
Alexandre Ganea via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 29 07:53:15 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rG471d06020a6a: [CIndex] Fix annotate-deep-statements test when using a Debug build (authored by aganea).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70149/new/
https://reviews.llvm.org/D70149
Files:
clang/lib/Sema/SemaChecking.cpp
clang/tools/libclang/CIndex.cpp
Index: clang/tools/libclang/CIndex.cpp
===================================================================
--- clang/tools/libclang/CIndex.cpp
+++ clang/tools/libclang/CIndex.cpp
@@ -3595,6 +3595,7 @@
const char *const *command_line_args, int num_command_line_args,
struct CXUnsavedFile *unsaved_files, unsigned num_unsaved_files,
unsigned options, CXTranslationUnit *out_TU) {
+ noteBottomOfStack();
SmallVector<const char *, 4> Args;
Args.push_back("clang");
Args.append(command_line_args, command_line_args + num_command_line_args);
@@ -3619,6 +3620,7 @@
CXErrorCode result = CXError_Failure;
auto ParseTranslationUnitImpl = [=, &result] {
+ noteBottomOfStack();
result = clang_parseTranslationUnit_Impl(
CIdx, source_filename, command_line_args, num_command_line_args,
llvm::makeArrayRef(unsaved_files, num_unsaved_files), options, out_TU);
@@ -6622,9 +6624,10 @@
void clang_executeOnThread(void (*fn)(void*), void *user_data,
unsigned stack_size) {
- llvm::llvm_execute_on_thread(
- fn, user_data,
- stack_size == 0 ? llvm::None : llvm::Optional<unsigned>(stack_size));
+ llvm::llvm_execute_on_thread(fn, user_data,
+ stack_size == 0
+ ? clang::DesiredStackSize
+ : llvm::Optional<unsigned>(stack_size));
}
//===----------------------------------------------------------------------===//
Index: clang/lib/Sema/SemaChecking.cpp
===================================================================
--- clang/lib/Sema/SemaChecking.cpp
+++ clang/lib/Sema/SemaChecking.cpp
@@ -12950,7 +12950,8 @@
// expression or statement in the body of the function [and thus before
// the value computation of its result].
SequencedSubexpression Sequenced(*this);
- Base::VisitCallExpr(CE);
+ SemaRef.runWithSufficientStackSpace(CE->getExprLoc(),
+ [&] { Base::VisitCallExpr(CE); });
// FIXME: CXXNewExpr and CXXDeleteExpr implicitly call functions.
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70149.231546.patch
Type: text/x-patch
Size: 2116 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191129/b4cf1feb/attachment.bin>
More information about the cfe-commits
mailing list