]> granicus.if.org Git - clang/commit
[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)
commitf74e91e17369bbc076e875da6e20d45764ec0f7e
treeb9c652f6fb854e4200ed01c9930c851f89500d73
parent51f62d67d98fb6f1d8a9d0aa0d5371981ec0ee44
[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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284643 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaCUDA.cpp
test/SemaCUDA/bad-calls-on-same-line.cu [new file with mode: 0644]