]> granicus.if.org Git - clang/commit
Add the notion of deferred diagnostics.
authorJustin Lebar <jlebar@google.com>
Mon, 15 Aug 2016 20:38:56 +0000 (20:38 +0000)
committerJustin Lebar <jlebar@google.com>
Mon, 15 Aug 2016 20:38:56 +0000 (20:38 +0000)
commite0242d84df1df4428f9e05a115a516ba86933cc7
tree28fd10a10bb5fbb075b1b40e55934dfeb750faab
parent12e216a7865d10ba7aa62a0d3113d490eda53f59
Add the notion of deferred diagnostics.

Summary:
This patch lets you create diagnostics that are emitted if and only if a
particular FunctionDecl is codegen'ed.

This is necessary for CUDA, where some constructs -- e.g. calls from
host+device functions to host functions when compiling for device -- are
allowed to appear in semantically-correct programs, but only if they're
never codegen'ed.

Reviewers: rnk

Subscribers: cfe-commits, tra

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278735 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
lib/AST/Decl.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h