[all-commits] [llvm/llvm-project] 9ba1a3: Reject invalid integer constants in unevaluated pr...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Tue Apr 8 11:26:21 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ba1a3fcb53936f20533585df283b3734ae8c4ef
https://github.com/llvm/llvm-project/commit/9ba1a3fcb53936f20533585df283b3734ae8c4ef
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2025-04-08 (Tue, 08 Apr 2025)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/Lex/PPExpressions.cpp
A clang/test/Preprocessor/constants.c
Log Message:
-----------
Reject invalid integer constants in unevaluated preprocessor operands (#134884)
Clang was previously accepting invalid code like:
```
#if 1 ? 1 : 999999999999999999999
#endif
```
because the integer constant (which is too large to fit into any
standard or extended integer type) was in an unevaluated branch of the
conditional operator. Similar invalid code involving || or && was also
accepted and is now rejected.
Fixes #134658
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list