diff --git a/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp --- a/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp @@ -262,7 +262,9 @@ if (T->getAsStructureType()) { if (Find(FR)) return true; - } else { + } else if (!I->isUnnamedBitfield()){ + // unnamed bitfields are skipped during aggregate initialization + // Since they are not supposed to be used, warnings should not be reported const SVal &V = StoreMgr.getBinding(store, loc::MemRegionVal(FR)); if (V.isUndef()) return true;