aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-02-20 16:39:26 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-02-20 16:39:26 +0300
commit9ea5d17cc9544838c73e593de4ef224d54fa1cff (patch)
treea1f5865f8e80e3ba63d1f6a1e76c6dbfcc1a5588 /clang/lib/Frontend/CompilerInvocation.cpp
parentc7b7f76ae6ae2a5f3d9753b37ef811da15386cd4 (diff)
downloadllvm-9ea5d17cc9544838c73e593de4ef224d54fa1cff.zip
llvm-9ea5d17cc9544838c73e593de4ef224d54fa1cff.tar.gz
llvm-9ea5d17cc9544838c73e593de4ef224d54fa1cff.tar.bz2
[Sema] Demote call-site-based 'alignment is a power of two' check for AllocAlignAttr into a warning
Summary: As @rsmith notes in https://reviews.llvm.org/D73020#inline-672219 while that is certainly UB land, it may not be actually reachable at runtime, e.g.: ``` template<int N> void *make() { if ((N & (N-1)) == 0) return operator new(N, std::align_val_t(N)); else return operator new(N); } void *p = make<7>(); ``` and we shouldn't really error-out there. That being said, i'm not really following the logic here. Which ones of these cases should remain being an error? Reviewers: rsmith, erichkeane Reviewed By: erichkeane Subscribers: cfe-commits, rsmith Tags: #clang Differential Revision: https://reviews.llvm.org/D73996
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions