[PATCH] D152495: [Clang][SemaCXX] Add unused warning for variables declared in condition expressions
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 22 23:10:57 PDT 2023
shafik added inline comments.
================
Comment at: clang/lib/Sema/SemaExprCXX.cpp:4003-4004
+ // that are not referenced or used later. e.g.: if (int var = init());
+ ConditionVar->setReferenced(false);
+ ConditionVar->setIsUsed(false);
+
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152495/new/
https://reviews.llvm.org/D152495
More information about the cfe-commits
mailing list