github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,c --
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
clang/test/Analysis/atomics.c --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git
a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
index 2df0aa33f..4ee21f4a6 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h
@@ -349,9 +349,8 @@ public:
assert((type->isObjCObjectPointerType() || Loc::isLocType(type)) &&
"makeNullWithType must use pointer type");
- type = type->isAtomicType()
- ? type->getAs<AtomicType>()->getValueType()
- : type;
+ type =
+ type->isAtomicType() ? type->getAs<AtomicType>()->getValueType() :
type;
// The `sizeof(T&)` is `sizeof(T)`, thus we replace the reference with a
// pointer. Here we assume that references are actually implemented by
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
index 4207432be..d7644645b 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -260,9 +260,7 @@ public:
void dumpToStream(raw_ostream &Out) const;
static bool isLocType(QualType T) {
- T = T->isAtomicType()
- ? T->getAs<AtomicType>()->getValueType()
- : T;
+ T = T->isAtomicType() ? T->getAs<AtomicType>()->getValueType() : T;
return T->isAnyPointerType() || T->isBlockPointerType() ||
T->isReferenceType() || T->isNullPtrType();
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/190131
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits