mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 11:35:51 -04:00

Summary: The crash occurs when the first token after a preamble is a macro expansion. Fixed by moving replayPreambleConditionalStack from Parser into Preprocessor. It is now called right after the predefines file is processed. Reviewers: erikjv, bkramer, klimek, yvvan Reviewed By: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D36872 llvm-svn: 311330
13 lines
441 B
C++
13 lines
441 B
C++
#ifndef HEADER_GUARD
|
|
|
|
#define FOO int aba;
|
|
FOO
|
|
|
|
#endif
|
|
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 \
|
|
// RUN: local -std=c++14 %s 2>&1 \
|
|
// RUN: | FileCheck %s --implicit-check-not "libclang: crash detected" \
|
|
// RUN: --implicit-check-not "error:"
|
|
// CHECK: macro expansion=FOO:3:9 Extent=[4:1 - 4:4]
|
|
// CHECK: VarDecl=aba:4:1 (Definition) Extent=[4:1 - 4:4]
|