This revision was automatically updated to reflect the committed changes.
Closed by commit rL299951: Fix PR13910: Don't warn that __builtin_unreachable()
is unreachable (authored by arphaman).
Changed prior to commit:
https://reviews.llvm.org/D25321?vs=73898&id=94834#toc
Repository:
rL LLVM
aprantl accepted this revision.
aprantl added a reviewer: aprantl.
aprantl added a comment.
This revision is now accepted and ready to land.
Thanks, LGTM!
Repository:
rL LLVM
https://reviews.llvm.org/D25321
___
cfe-commits mailing list
cfe-commit
arphaman updated this revision to Diff 73898.
arphaman marked an inline comment as done.
arphaman added a comment.
The updated patch uses Adrian's suggestion.
Repository:
rL LLVM
https://reviews.llvm.org/D25321
Files:
lib/Analysis/ReachableCode.cpp
test/Sema/warn-unreachable.c
Index: t
aprantl added inline comments.
> ReachableCode.cpp:64
> +const FunctionDecl *FDecl = dyn_cast(DRE->getDecl());
> +return FDecl && FDecl->getIdentifier() &&
> + FDecl->getBuiltinID() == Builtin::BI__builtin_unreachable;
Maybe also wrap the inner dyn_cast in an if for symmetry?
On 6 October 2016 at 15:50, David Blaikie wrote:
>
>
> On Thu, Oct 6, 2016 at 6:16 AM Alex Lorenz wrote:
>
>> arphaman created this revision.
>> arphaman added reviewers: dblaikie, krememek.
>> arphaman added a subscriber: cfe-commits.
>> arphaman set the repository for this revision to rL LLVM.
On Thu, Oct 6, 2016 at 6:16 AM Alex Lorenz wrote:
> arphaman created this revision.
> arphaman added reviewers: dblaikie, krememek.
> arphaman added a subscriber: cfe-commits.
> arphaman set the repository for this revision to rL LLVM.
>
> This patch fixes the issue of clang emitting an unreachab
arphaman updated this revision to Diff 73781.
arphaman added a comment.
Slight update: There's no need to pass `CFGBlock` into `isBuiltinUnreachable`.
Repository:
rL LLVM
https://reviews.llvm.org/D25321
Files:
lib/Analysis/ReachableCode.cpp
test/Sema/warn-unreachable.c
Index: test/Sema
arphaman created this revision.
arphaman added reviewers: dblaikie, krememek.
arphaman added a subscriber: cfe-commits.
arphaman set the repository for this revision to rL LLVM.
This patch fixes the issue of clang emitting an unreachable warning when it
encounters unreachable `__builtin_unreachab