Issue 79685
Summary clang/lib/Format/WhitespaceManager.cpp:1472: Sanity check after use ?
Labels clang
Assignees
Reporter dcb314
    Static analyser cppcheck says:

clang/lib/Format/WhitespaceManager.cpp:1472:23: style: Array index 'j' is used before limits check. [arrayIndexThenCheck]

Source code is

       while (Changes[j].Tok != NextNonComment && j < End)

Sanity check before use would be more usual.

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

Reply via email to