Anastasia abandoned this revision.
Anastasia added a comment.
I just took the ownership of this to be able to close it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D16351/new/
https://reviews.llvm.org/D16351
___
cfe-commits mailing list
Anastasia commandeered this revision.
Anastasia added a reviewer: ichesnokov.
Anastasia added a comment.
Herald added a subscriber: ebevhan.
I just closed the bug because it's no longer failing on the master branch. So I
don't think this is needed.
CHANGES SINCE LAST ACTION
arsenm added a comment.
Herald added subscribers: jdoerfert, jfb, yaxunl, wdng.
Is this still needed? The bug is still open
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D16351/new/
https://reviews.llvm.org/D16351
___
cfe-commits mailing
Anastasia added inline comments.
Comment at: test/SemaOpenCL/implicit-typedef.cl:1
@@ +1,2 @@
+// RUN: %clang_cc1 %s -DTEST_WARNINGS -cl-std=CL2.0 -verify -pedantic
-fsyntax-only -Wsystem-headers
+// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only
do you need
ichesnokov updated this revision to Diff 47137.
ichesnokov added a comment.
Another warning text implemented for OpenCL.
Like: redefinition of OpenCL builtin typedef 'atomic_flag'
http://reviews.llvm.org/D16351
Files:
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
ichesnokov added inline comments.
Comment at: test/SemaOpenCL/implicit-typedef.cl:4
@@ +3,3 @@
+
+#if defined(TEST_WARNINGS)
+typedef atomic_int atomic_flag; // expected-warning {{redefinition of OpenCL
builtin typedef 'atomic_flag'}}
Thank you, Anastasia!
I
Anastasia added inline comments.
Comment at: test/SemaOpenCL/implicit-typedef.cl:3
@@ +2,3 @@
+// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only
+
+#if defined(TEST_WARNINGS)
ichesnokov wrote:
> Are you mean another text of warning? Notice that actual patch will
ichesnokov added inline comments.
Comment at: test/SemaOpenCL/implicit-typedef.cl:3
@@ +2,3 @@
+// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only
+
+#if defined(TEST_WARNINGS)
Anastasia wrote:
> ichesnokov wrote:
> > Are you mean another text of warning? Notice
Anastasia added inline comments.
Comment at: test/SemaOpenCL/implicit-typedef.cl:3
@@ +2,3 @@
+// RUN: %clang_cc1 %s -cl-std=CL2.0 -fsyntax-only
+
+#if defined(TEST_WARNINGS)
ichesnokov wrote:
> Anastasia wrote:
> > ichesnokov wrote:
> > > Are you mean another
ichesnokov marked 3 inline comments as done.
ichesnokov added a comment.
Notice that redefinition of typedef defined at system header will show the same
message.
http://reviews.llvm.org/D16351
___
cfe-commits mailing list
ichesnokov updated this revision to Diff 46876.
ichesnokov marked 2 inline comments as done.
ichesnokov added a comment.
Test case enriched to check typedef redefinition without warnings.
Minor fix of comment.
http://reviews.llvm.org/D16351
Files:
lib/Sema/SemaDecl.cpp
ichesnokov marked 3 inline comments as done.
Comment at: lib/Sema/SemaDecl.cpp:2039
@@ -2038,1 +2038,3 @@
+ // Added isImplicit() check, because implicit TypeDecl::getLocation()
+ // returns 0. The're many implicit typedefs in OpenCL, e.g. atomic_flag.
Anastasia added inline comments.
Comment at: lib/Sema/SemaDecl.cpp:2039
@@ +2038,3 @@
+ if (Old->isImplicit() || New->isImplicit()) {
+// Since we don't emit system header warnings for compatibility with GCC,
+// don't do this for implicit type redifinition warnings the
ichesnokov removed rL LLVM as the repository for this revision.
ichesnokov updated this revision to Diff 46634.
ichesnokov added a comment.
Warnings added to the case. Turned off by default:
Original bahavior:
"// If we have a redefinition of a typedef in C, emit a warning. This warning
// is
ichesnokov marked 3 inline comments as done.
Comment at: test/SemaOpenCL/implicit-typedef.cl:2
@@ +1,2 @@
+// RUN: %clang_cc1 %s -cl-std=CL2.0 -verify -pedantic -fsyntax-only
-Wsystem-headers
+typedef atomic_int atomic_flag; // expected-warning {{redefinition of typedef
ichesnokov added a comment.
> majnemer: Why isn't this logic buried in GetArgumentVector so that other
> tools may take advantage of it?
Sorry, I do not understand what you say.
I looked into GetArgumentVector and this function is dummy now in both Unix and
Windows, and it does not look like
Anastasia added a subscriber: Anastasia.
Comment at: lib/Sema/SemaDecl.cpp:2038
@@ +2037,3 @@
+ // returns 0. The're many implicit typedefs in OpenCL, e.g. atomic_flag.
+ if (Old->isImplicit() || New->isImplicit()) {
+return;
Braces are not needed.
ichesnokov added a comment.
majnemer,
I'll try to find answer to your question tomorrow.
Repository:
rL LLVM
http://reviews.llvm.org/D16351
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ichesnokov added a comment.
BugZilla page: https://llvm.org/bugs/show_bug.cgi?id=25404
Repository:
rL LLVM
http://reviews.llvm.org/D16351
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
Why isn't this logic buried in GetArgumentVector so that other tools may
take advantage of it?
On Saturday, January 30, 2016, Igor Chesnokov via cfe-commits <
cfe-commits@lists.llvm.org> wrote:
> ichesnokov added a comment.
>
> Please review and commit.
>
>
> Repository:
> rL LLVM
>
>
ichesnokov added a comment.
BugZilla page: https://llvm.org/bugs/show_bug.cgi?id=25404
Please review and submit this bug.
Comment at: test/SemaOpenCL/implicit-typedef.cl:2
@@ +1,2 @@
+// RUN: %clang_cc1 "-cc1" "-emit-llvm" "-D" "cl_khr_fp64" "-D"
"cl_khr_int64_base_atomics"
ichesnokov set the repository for this revision to rL LLVM.
ichesnokov updated this revision to Diff 46470.
ichesnokov added a comment.
Removed unuseful patch code.
Repository:
rL LLVM
http://reviews.llvm.org/D16351
Files:
lib/Sema/SemaDecl.cpp
test/SemaOpenCL/implicit-typedef.cl
ichesnokov added a comment.
Please review and commit.
Repository:
rL LLVM
http://reviews.llvm.org/D16351
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ichesnokov added inline comments.
Comment at: test/SemaOpenCL/implicit-typedef.cl:2
@@ +1,2 @@
+// RUN: %clang_cc1 "-cc1" "-emit-llvm" "-D" "cl_khr_fp64" "-D"
"cl_khr_int64_base_atomics" "-fno-dwarf-directory-asm" "-fmessage-length" "205"
"-fdiagnostics-show-option"
ichesnokov added a comment.
BugZilla page:
https://llvm.org/bugs/show_bug.cgi?id=25404
Repository:
rL LLVM
http://reviews.llvm.org/D16351
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ichesnokov updated this revision to Diff 46229.
ichesnokov marked 2 inline comments as done.
http://reviews.llvm.org/D16351
Files:
lib/Sema/SemaDecl.cpp
test/SemaOpenCL/implicit-typedef.cl
tools/driver/driver.cpp
Index: tools/driver/driver.cpp
ichesnokov marked an inline comment as done.
Comment at: lib/Sema/SemaDecl.cpp:2039
@@ +2038,3 @@
+ if (Old->isImplicit() || New->isImplicit()) {
+ return;
+ }
asl wrote:
> Please follow the LLVM's coding style guidelines. E.g. *never* use tabs.
It is
arsenm added a subscriber: arsenm.
arsenm added a comment.
Add cfe-commits
http://reviews.llvm.org/D16351
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
28 matches
Mail list logo