<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/unittests/StaticAnalyzer/APSIntTypeTest.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[analyzer] Fix assertion in getAPSIntType</title>
<updated>2022-12-11T23:56:51+00:00</updated>
<author>
<name>einvbri</name>
<email>vince.a.bridgers@ericsson.com</email>
</author>
<published>2022-12-10T01:18:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=443b46e6d3139c1306caddd06efa674dcea9f38f'/>
<id>443b46e6d3139c1306caddd06efa674dcea9f38f</id>
<content type='text'>
getAPSIntType crashes when analzying a simple case that uses a fixed
point type. getAPSIntType needs to handle fixed point types differently
to get sign information. LIT and Unittests were added since there were
 none previously added.

   clang: &lt;root&gt;/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155:
      clang::ento::APSIntType clang::ento::BasicValueFactory::getAPSIntType(clang::QualType) const:
      Assertion `T-&gt;isIntegralOrEnumerationType() || Loc::isLocType(T)' failed.

    Program received signal SIGABRT, Aborted.
    0x00007ffff66e2387 in raise () from /lib64/libc.so.6
    (gdb) bt
        at &lt;root&gt;/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155
        at &lt;root&gt;/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:172
          LHS=0x108965a0, op=clang::BO_Shr, RHS=..., resultTy=...) at
          &lt;root&gt;/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:213
          (this=0x1088e460, state=..., op=clang::BO_Shr, lhs=..., rhs=..., resultTy=...)
          at &lt;root&gt;/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:681

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D139759
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
getAPSIntType crashes when analzying a simple case that uses a fixed
point type. getAPSIntType needs to handle fixed point types differently
to get sign information. LIT and Unittests were added since there were
 none previously added.

   clang: &lt;root&gt;/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155:
      clang::ento::APSIntType clang::ento::BasicValueFactory::getAPSIntType(clang::QualType) const:
      Assertion `T-&gt;isIntegralOrEnumerationType() || Loc::isLocType(T)' failed.

    Program received signal SIGABRT, Aborted.
    0x00007ffff66e2387 in raise () from /lib64/libc.so.6
    (gdb) bt
        at &lt;root&gt;/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155
        at &lt;root&gt;/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:172
          LHS=0x108965a0, op=clang::BO_Shr, RHS=..., resultTy=...) at
          &lt;root&gt;/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:213
          (this=0x1088e460, state=..., op=clang::BO_Shr, lhs=..., rhs=..., resultTy=...)
          at &lt;root&gt;/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:681

Reviewed By: steakhal

Differential Revision: https://reviews.llvm.org/D139759
</pre>
</div>
</content>
</entry>
</feed>
