Commit a5e33d5
committed
Fix macro argument parentheses for clang-tidy compliance
Add proper parentheses around macro arguments in ADA_ASSERT_EQUAL,
ADA_ASSERT_TRUE, and ADA_ASSUME macros to prevent operator precedence
issues and comply with clang-tidy's bugprone-macro-parentheses check.
This is a safety improvement that prevents potential bugs when macro
arguments contain expressions with lower-precedence operators.
Fixes:
- ADA_ASSERT_EQUAL: Wrap LHS and RHS in comparisons and output
- ADA_ASSERT_TRUE: Wrap COND in negation check
- ADA_ASSUME: Wrap COND in both MSVC and GCC/Clang versions1 parent 644b574 commit a5e33d5
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
| 206 | + | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
| 226 | + | |
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
0 commit comments