[cfe-commits] r59446 - /cfe/trunk/TODO.txt

Douglas Gregor doug.gregor at gmail.com
Mon Nov 17 09:14:11 PST 2008


Author: dgregor
Date: Mon Nov 17 11:14:10 2008
New Revision: 59446

URL: http://llvm.org/viewvc/llvm-project?rev=59446&view=rev
Log:
Add TODO item for adding more source-range information to declarators

Modified:
    cfe/trunk/TODO.txt

Modified: cfe/trunk/TODO.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/TODO.txt?rev=59446&r1=59445&r2=59446&view=diff

==============================================================================
--- cfe/trunk/TODO.txt (original)
+++ cfe/trunk/TODO.txt Mon Nov 17 11:14:10 2008
@@ -32,3 +32,24 @@
 C++ (checker): For iterators, warn of the use of "iterator++" instead
   of "++iterator" when when the value returned by operator++(int) is
   ignored.
+
+//===---------------------------------------------------------------------===//
+
+We want to keep more source range information in Declarator to help
+produce better diagnostics. Declarator::getSourceRange() should be
+implemented to give a range for the whole declarator with all of its
+specifiers, and DeclaratorChunk::ParamInfo should also have a source
+range covering the whole parameter, so that an error message like this:
+
+overloaded-operator-decl.cpp:37:23: error: parameter of overloaded post-increment operator must have type 'int' (not 'float')
+X operator++(X&, const float& f); 
+                              ^
+can be turned into something like this:
+
+overloaded-operator-decl.cpp:37:23: error: parameter of overloaded post-increment operator must have type 'int' (not 'float')
+X operator++(X&, const float& f); 
+  ^              ~~~~~~~~~~~~~~
+
+
+
+





More information about the cfe-commits mailing list