aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorZiqing Luo <ziqing@udel.edu>2025-07-04 13:53:23 +0900
committerGitHub <noreply@github.com>2025-07-04 12:53:23 +0800
commitafd20aaca5fd89dd14992c3fe2f735c5e16ad986 (patch)
tree359ec81767e19f54b18ff86d695733a1ad20c245 /flang/lib/Frontend/CompilerInvocation.cpp
parent85aaaf6e7409999842782f9fbcde3b5be4aa0c79 (diff)
downloadllvm-afd20aaca5fd89dd14992c3fe2f735c5e16ad986.zip
llvm-afd20aaca5fd89dd14992c3fe2f735c5e16ad986.tar.gz
llvm-afd20aaca5fd89dd14992c3fe2f735c5e16ad986.tar.bz2
[clang-scan-deps] Fix "unterminated conditional directive" bug (#146645)
`clang-scan-deps` threw "unterminated conditional directive" error falsely on the following example: ``` #ifndef __TEST #define __TEST #if defined(__TEST_DUMMY) #if defined(__TEST_DUMMY2) #pragma GCC warning \ "Hello!" #else #pragma GCC error \ "World!" #endif // defined(__TEST_DUMMY2) #endif // defined(__TEST_DUMMY) #endif // #ifndef __TEST ``` The issue comes from PR #143950, where the flag `LastNonWhitespace` does not correctly represent the state for the example above. The PR aimed to support that a line-continuation can be followed by whitespaces. This commit fixes the issue by moving the `LastNonWhitespace` variable to the inner loop so that it will be correctly reset. rdar://153742186
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions