Skip to content
Commit 0dd05d4b authored by Hal Finkel's avatar Hal Finkel
Browse files

constexpr evaluation for __builtin_assume_aligned

Richard noted in the review of r217349 that extra handling of
__builtin_assume_aligned inside of the expression evaluator was needed. He was
right, and this should address the concerns raised, namely:

 1. The offset argument to __builtin_assume_aligned can have side effects, and
    we need to make sure that all arguments are properly evaluated.

 2. If the alignment assumption does not hold, that introduces undefined
    behavior, and undefined behavior cannot appear inside a constexpr.

and hopefully the diagnostics produced are detailed enough to explain what is
going on.

llvm-svn: 218992
parent 6a654333
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment