[clang] [Liveness][analyzer] Fix handling of [[assume]] attributes (PR #198618)

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 03:54:10 PDT 2026


NagyDonat wrote:

For a moment I was scared by the buildbot result https://lab.llvm.org/buildbot/#/builders/114/builds/747 where the compilation of `RangeConstraintManager.cpp` had failed with
```In function ‘_ForwardIterator1 std::__search(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate)’:
cc1plus: error: expected primary-expression before ‘=’ token [-Wtemplate-body]  (LINE REPEATED x 10)
In file included from /usr/include/c++/15/bits/stl_uninitialized.h:63,
                 from /usr/include/c++/15/memory:71,
                 from (LLVM REPO)/llvm/include/llvm/Support/Casting.h:20,
                 from (LLVM REPO)/clang/include/clang/Basic/LLVM.h:21,
                 from (LLVM REPO)/clang/include/clang/Basic/JsonSupport.h:12,
                 from (LLVM REPO)/clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp:14:
/usr/include/c++/15/bits/stl_algobase.h:2157:28: error: expected primary-expression before ‘=’ token [-Wtemplate-body]
 2157 |                 __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2));
      |                            ^~~~~
/usr/include/c++/15/bits/stl_algobase.h:2157:35: error: ‘::__iter_comp_iter’ has not been declared; did you mean ‘__gnu_cxx::__ops::__iter_comp_iter’? [-Wtemplate-body]
 2157 |                 __gnu_cxx::__ops::__iter_comp_iter(__predicate, __first2));
      |                                   ^~~~~~~~~~~~~~~~
      |                                   __gnu_cxx::__ops::__iter_comp_iter
In file included from /usr/include/c++/15/bits/stl_algobase.h:71:
/usr/include/c++/15/bits/predefined_ops.h:374:5: note: ‘__gnu_cxx::__ops::__iter_comp_iter’ declared here
  374 |     __iter_comp_iter(_Iter_comp_iter<_Compare> __comp, _Iterator __it)
      |     ^~~~~~~~~~~~~~~~
```
(and this commit was the only fresh CSA commit), but it turns out that the next job https://lab.llvm.org/buildbot/#/builders/114/builds/748 succeeded on the same buildbot (and I verified that it also includes this commit).

https://github.com/llvm/llvm-project/pull/198618


More information about the cfe-commits mailing list