aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
diff options
context:
space:
mode:
authorGeorge Burgess IV <george.burgess.iv@gmail.com>2016-05-10 01:59:34 +0000
committerGeorge Burgess IV <george.burgess.iv@gmail.com>2016-05-10 01:59:34 +0000
commit3dc16691339e0153b2d109672b0ae65eeee3c029 (patch)
treea7f6edc018d1c684c0263bd1a5d461b5538c75d1 /llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp
parent958faec74f8d25cb790382e600fd2f64ad2e5264 (diff)
downloadllvm-3dc16691339e0153b2d109672b0ae65eeee3c029.zip
llvm-3dc16691339e0153b2d109672b0ae65eeee3c029.tar.gz
llvm-3dc16691339e0153b2d109672b0ae65eeee3c029.tar.bz2
[Sema] Fix an overload resolution bug with enable_if.
Currently, if clang::isBetterOverloadCandidate encounters an enable_if attribute on either candidate that it's inspecting, it will ignore all lower priority attributes (e.g. pass_object_size). This is problematic in cases like: ``` void foo(char *c) __attribute__((enable_if(1, ""))); void foo(char *c __attribute__((pass_object_size(0)))) __attribute__((enable_if(1, ""))); ``` ...Because we would ignore the pass_object_size attribute in the second `foo`, and consider any call to `foo` to be ambiguous. This patch makes overload resolution consult further tiebreakers (e.g. pass_object_size) if two candidates have equally good enable_if attributes. llvm-svn: 269005
Diffstat (limited to 'llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions