Review Request 129108: decltype support test

Radu Benea kitanatahu at gmail.com
Thu Oct 6 21:07:08 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/129108/
-----------------------------------------------------------

(Updated Oct. 6, 2016, 9:07 p.m.)


Review request for KDevelop.


Changes
-------

reordered declaration of short unsigned int as kdevelop would generate it

I did some testing and managed to discover the source of the missing type qualifiers.
Apparently decltype is initialized as a deferredType but all type info is discovered, than it gets updated and discarded.
The following hack seems to fix the decltype test. I don't understand enough about clang to come up with the proper solution.

@@ -326,11 +326,11 @@ struct Visitor
     AbstractType *dispatchType(CXType type, CXCursor cursor)
     {
         IF_DEBUG(clangDebug() << "TK:" << type.kind;)
 
         auto kdevType = createType<TK>(type, cursor);
-        if (kdevType) {
+        if (kdevType && !kdevType->modifiers()) {
             setTypeModifiers<TK>(type, kdevType);
         }
         return kdevType;
     }
 //BEGIN dispatch*


Repository: kdevelop


Description
-------

added test to check decltype type deduction support in clang


Diffs (updated)
-----

  languages/clang/tests/test_duchain.h e4bd5dd 
  languages/clang/tests/test_duchain.cpp 987b5ee 

Diff: https://git.reviewboard.kde.org/r/129108/diff/


Testing
-------


Thanks,

Radu Benea

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161006/533cd76c/attachment.html>


More information about the KDevelop-devel mailing list