summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2014-09-09 21:42:16 +0000
committerJordan Rose <jordan_rose@apple.com>2014-09-09 21:42:16 +0000
commit21933ccdd759c852dc56e1c8a945d3e3744bc53e (patch)
tree6507d844044f69da2a8ed8fc4fb49fda8c4f84b9 /clang/lib/StaticAnalyzer
parent39de3110712cb4547a835777310dbead46c1a002 (diff)
downloadbcm5719-llvm-21933ccdd759c852dc56e1c8a945d3e3744bc53e.tar.gz
bcm5719-llvm-21933ccdd759c852dc56e1c8a945d3e3744bc53e.zip
Teach the analyzer that __builtin_assume_aligned returns its first argument.
Patch by Daniel Fahlgren! llvm-svn: 217461
Diffstat (limited to 'clang/lib/StaticAnalyzer')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
index a8710498488..104a81eac4c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
@@ -42,8 +42,10 @@ bool BuiltinFunctionChecker::evalCall(const CallExpr *CE,
return false;
case Builtin::BI__builtin_expect:
+ case Builtin::BI__builtin_assume_aligned:
case Builtin::BI__builtin_addressof: {
- // For __builtin_expect, just return the value of the subexpression.
+ // For __builtin_expect and __builtin_assume_aligned, just return the value
+ // of the subexpression.
// __builtin_addressof is going from a reference to a pointer, but those
// are represented the same way in the analyzer.
assert (CE->arg_begin() != CE->arg_end());
OpenPOWER on IntegriCloud