Clean up 'target' attribute diagnostics
authorErich Keane <erich.keane@intel.com>
Fri, 16 Feb 2018 17:31:59 +0000 (17:31 +0000)
committerErich Keane <erich.keane@intel.com>
Fri, 16 Feb 2018 17:31:59 +0000 (17:31 +0000)
commit29636aaaa68e030f01126d7babd69dcc0ceaadb1
tree63bc6d1553dd2e96cab06eabea910c70494bbb13
parent1b81064d1e3555a24eef3c09bc2ccd481eb9b31b
Clean up 'target' attribute diagnostics

There were a few issues previously with the target
attribute diagnostics implementation that lead to the
attribute being added to the AST despite having an error
in it.

This patch changes that, and adds a test to ensure it
does not get added to the AST.

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

llvm-svn: 325364
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/Sema/attr-target-ast.c [new file with mode: 0644]
clang/test/Sema/attr-target.c
clang/test/SemaCXX/attr-target-mv.cpp