Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

ccFormat: Enable Clang-Tidy checks #708

Merged
merged 1 commit into from
Jul 17, 2015

Conversation

swaroop-sridhar
Copy link
Contributor

  1. Change ccFormat to run clang-tidy checks by default
    Use ccFormat --untidy to only run formatting checks
  2. Fix the warnings/errors generated by ccFormat

@@ -168,6 +168,9 @@ class ABIInfo {
ABIType ResultType, llvm::ArrayRef<ABIType> ArgTypes,
ABIArgInfo &ResultInfo,
std::vector<ABIArgInfo> &ArgInfos) const = 0;

/// \brief Virtual Destructor
virtual ~ABIInfo()=default;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid warnings from [clang-diagnostic-delete-non-virtual-dtor]
warning: delete called on 'ABIInfo' that is abstract but has non-virtual destructor

@swaroop-sridhar
Copy link
Contributor Author

@adiaaida please review

@@ -43,6 +43,8 @@ def runTidy(args):
"LLVM_BUILD environment variable."
return 1

coreclrbuild = expandPath(args.coreclr_build)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need a check like above to confirm that coreclr_build is not none. Also, is this the path to just the coreclr directory or some other path? I need this to make the job work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a path to the CORECLR build directory CoreClr\bin\Product\Windows_NT.x64.debug

@swaroop-sridhar swaroop-sridhar force-pushed the tidy branch 3 times, most recently from f4631b0 to 8b09d41 Compare July 11, 2015 01:22
@michellemcdaniel
Copy link
Contributor

@dotnet-bot test this please

1 similar comment
@michellemcdaniel
Copy link
Contributor

@dotnet-bot test this please

@michellemcdaniel
Copy link
Contributor

@swaroop-sridhar the code formatting job is still failing. Can you take a look to see if we are missing something?

@swaroop-sridhar
Copy link
Contributor Author

@adiaaida: Looks like this is because of an incompatibality between VS 2013 used to build LLILC Jit, and VS 2015 libraries in the include path. ccFormat picks up os-includes from the INCLUDE environment variable. Looks like the lab's INCLUDE points to VS 2015.
Should we hard-code the VS2013 paths in the ccFormat script?

@michellemcdaniel
Copy link
Contributor

@mmitche what do you think about this headers issue and the lab?

@mmitche
Copy link
Member

mmitche commented Jul 16, 2015

@adiaaida @swaroop-sridhar Which version of vcvars/vsdevcmd are you using? It should totally depend on which of the development command prompts you open. They shouldn't leak include paths between.

@michellemcdaniel
Copy link
Contributor

@dotnet-bot test this please

@michellemcdaniel
Copy link
Contributor

we use the version in VS120COMNTOOLS.

@mmitche
Copy link
Member

mmitche commented Jul 16, 2015

That's 2013, so it probably warrants some investigation as to why the other includes are somehow getting on the path

@michellemcdaniel
Copy link
Contributor

My best guess is that we run vcvars all for the build, but for the run of clang-tidy, we're in a batch env that hasn't had it run. I updated the job to see if I could fix the issue

@mmitche
Copy link
Member

mmitche commented Jul 16, 2015

I would imagine that without vcvars at all, there shouldn't be any includes.

@michellemcdaniel
Copy link
Contributor

@dotnet-bot test this please

@michellemcdaniel
Copy link
Contributor

Ok. It looks like I got the job all working now. Please take a look at the formatting errors that it's producing.

@richardlford
Copy link
Contributor

The formatter correction it made all look like good correction.

@swaroop-sridhar
Copy link
Contributor Author

I'll revert the changes to ABI.h/,cpp (in response to Pat's feedback) and retry the testing.

1) Change ccFormat to run clang-tidy checks by default
   Use ccFormat --untidy to only run formatting checks
2) Fix the warnings/errors generated by ccFormat
@swaroop-sridhar
Copy link
Contributor Author

@dotnet-bot test this please

2 similar comments
@swaroop-sridhar
Copy link
Contributor Author

@dotnet-bot test this please

@swaroop-sridhar
Copy link
Contributor Author

@dotnet-bot test this please

@mmitche
Copy link
Member

mmitche commented Jul 17, 2015

@swaroop-sridhar Are you seeing issues with the infra or are you just iterating on something?

@michellemcdaniel
Copy link
Contributor

@swaroop-sridhar I think the way I changed the lab job, it looks like it's running ccformat but it really is. It just isn't producing output after we call vcvarsall

@swaroop-sridhar
Copy link
Contributor Author

Some legs had failed because of github connection timeout, so retried.

swaroop-sridhar added a commit that referenced this pull request Jul 17, 2015
ccFormat: Enable Clang-Tidy checks
@swaroop-sridhar swaroop-sridhar merged commit 0d623b5 into dotnet:master Jul 17, 2015
@swaroop-sridhar swaroop-sridhar deleted the tidy branch July 17, 2015 19:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants