Nathan-Huckleberry marked an inline comment as done.
Nathan-Huckleberry added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:8100-8107
+        // All further checking is done on the subexpression
+        Match = AT.matchesType(S.Context, ExprTy);
+        if (Match) {
+          if (Match == analyze_printf::ArgType::NoMatchPedantic)
+            Pedantic = true;
+          else
+            return true;
----------------
Nathan-Huckleberry wrote:
> Nathan-Huckleberry wrote:
> > lebedev.ri wrote:
> > > lebedev.ri wrote:
> > > > Just add a new variable
> > > > ```
> > > > // All further checking is done on the subexpression
> > > > analyze_printf::ArgType::MatchKind Match2 = AT.matchesType(S.Context, 
> > > > ExprTy);
> > > > if (Match2 == analyze_printf::ArgType::Match)
> > > >   return true;
> > > > Pedantic |= Match2 == analyze_printf::ArgType::NoMatchPedantic;
> > > > ```
> > > Early return would simplify this still
> > Could be ArgType::NoMatch and wouldn't display a warning
> Wait this should definitely be an else-if
Nevermind you are correct. Will remove else case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D66186/new/

https://reviews.llvm.org/D66186



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to