mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 17:43:57 +00:00
8f738ac6d4
Summary: This fixes PR34547. `Lexer::LexEndOfFile` handles recording of ConditionalStack for preamble and reporting errors about unmatched conditionalal PP directives. However, SkipExcludedConditionalBlock contianed duplicated logic for reporting errors and clearing ConditionalStack, but not for preamble recording. This fix removes error reporting logic from `SkipExcludedConditionalBlock`, unmatched PP conditionals are now reported inside `Lexer::LexEndOfFile`. Reviewers: erikjv, klimek, bkramer Reviewed By: erikjv Subscribers: nik, cfe-commits Differential Revision: https://reviews.llvm.org/D37700 llvm-svn: 313014
9 lines
302 B
C++
9 lines
302 B
C++
// RUN: env CINDEXTEST_EDITING=1 c-index-test -test-load-source-reparse 5 \
|
|
// RUN: local -std=c++14 %s 2>&1 \
|
|
// RUN: | FileCheck %s
|
|
#ifdef FOO_H
|
|
|
|
void foo();
|
|
|
|
// CHECK: preamble-conditionals-inverted-with-error.cpp:4:2: error: unterminated conditional directive
|