Browse Source

Make it possible to invoke Annotate tool on already annotated codes.
[ci annotate]

Yao Wei Tjong 姚伟忠 10 years ago
parent
commit
1cc28dfe1c
2 changed files with 2 additions and 1 deletions
  1. 1 1
      Rakefile
  2. 1 0
      Source/Clang-Tools/Annotator/Annotator.cpp

+ 1 - 1
Rakefile

@@ -197,7 +197,7 @@ end
 # Usage: NOT intended to be used manually
 desc 'Build and run the annotate migration tool'
 task :ci_annotate do
-  system 'rake cmake URHO3D_CLANG_TOOLS=1 URHO3D_CLANG_TOOLS_ALL_GRAPHICS_BACKENDS=1 && rake make annotate' or abort 'Failed to annotate'
+  system 'rake cmake URHO3D_CLANG_TOOLS=1 && rake make annotate' or abort 'Failed to annotate'
   system "git config user.name $GIT_NAME && git config user.email $GIT_EMAIL && git remote set-url --push origin https://[email protected]/$TRAVIS_REPO_SLUG.git && if git fetch origin annotated:annotated 2>/dev/null; then git push -qf origin --delete annotated; fi && git checkout -B annotated && git stash -q && git reset --hard HEAD~ && git stash pop -q && git add -A Source/Urho3D && git commit -qm 'Result of annotate rake task. [ci skip]' && git push -qf -u origin annotated >/dev/null 2>&1" or abort 'Failed to push annotated branch'
 end
 

+ 1 - 0
Source/Clang-Tools/Annotator/Annotator.cpp

@@ -148,6 +148,7 @@ int main(int argc, const char** argv)
     // Find exported class declaration with Urho3D namespace
     annotateFinder.addMatcher(
         recordDecl(
+            unless(hasAttr(attr::Annotate)),
 #ifndef _MSC_VER
             hasAttr(attr::Visibility),
 #else