]> granicus.if.org Git - clang/commit
This patch causes clang to reject alias attributes that point to undefined
authorRafael Espindola <rafael.espindola@gmail.com>
Tue, 22 Oct 2013 13:51:06 +0000 (13:51 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Tue, 22 Oct 2013 13:51:06 +0000 (13:51 +0000)
commite37bf44c8012f36f900955d8513e03791803045e
tree7241ca35ed3d657046a7375eec7d5384d223c797
parent89673e0c7edb17927d531857be56766894c347c3
This patch causes clang to reject alias attributes that point to undefined
names. For example, with this patch we now reject

void f1(void) __attribute__((alias("g1")));

This patch is implemented in CodeGen. It is quiet a bit simpler and more
compatible with gcc than implementing it in Sema. The downside is that the
errors only fire during -emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193161 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticSemaKinds.td
lib/CodeGen/CGExprCXX.cpp
lib/CodeGen/CodeGenModule.cpp
lib/CodeGen/CodeGenModule.h
lib/Sema/SemaDeclAttr.cpp
test/Sema/attr-alias-elf.c [new file with mode: 0644]