[CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls.
authorJustin Lebar <jlebar@google.com>
Wed, 19 Oct 2016 21:03:38 +0000 (21:03 +0000)
committerJustin Lebar <jlebar@google.com>
Wed, 19 Oct 2016 21:03:38 +0000 (21:03 +0000)
commit9730ae943f3c639f9d0798a1319b4adc6d3deafc
tree5bb90b7acddcac1aa1304719ff4c6e5e055a79a6
parentcdd6da83a69c895711b62f306c7ca8ccda453662
[CUDA] Emit errors for wrong-side calls made on the same line as non-wrong-side calls.

Summary:
This fixes two related bugs:

1) Previously, if you had a non-wrong side call at some source code
location L, we wouldn't emit errors for wrong-side calls that appeared
at L.

2) We'd only emit one wrong-side error per source code location, when we
actually want to emit it twice if we hit this line more than once due to
e.g. template instantiation.

Reviewers: tra

Subscribers: rnk, cfe-commits

Differential Revision: https://reviews.llvm.org/D25702

llvm-svn: 284643
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaCUDA.cpp
clang/test/SemaCUDA/bad-calls-on-same-line.cu [new file with mode: 0644]