Commit Graph

1362 Commits

Author SHA1 Message Date
Kristof Umann 1c9870cf13 [analyzer][www] Add more useful links
Differential Revision: https://reviews.llvm.org/D52993

llvm-svn: 344031
2018-10-09 10:05:08 +00:00
Reid Kleckner 933de17ac2 Update Clang Windows getting started docs
Summary:
- Update the example VS project generation to use VS2017.
- Add docs for generating ninja build files, since they are popular.
- Remove reference to "make update" which no longer exists. Mention the
  monorepo instead.
- Try to explain gnuwin32/coreutils requirements better.
- Use https:// links where possible

Reviewers: zturner, STL_MSFT

Subscribers: jfb, cfe-commits

Differential Revision: https://reviews.llvm.org/D52843

llvm-svn: 343809
2018-10-04 20:34:52 +00:00
Kristina Brooks dc2cb4f1c7 [clang][www] Fix typo. NFC
Fix a one letter typo in diagnostics.html. (Wanted to try it with
arcanist).

Patch by king6cong

Differential Revision: https://reviews.llvm.org/D52511

llvm-svn: 343372
2018-09-29 09:45:21 +00:00
Richard Smith 8baa50013c [cxx2a] P0614R1: Support init-statements in range-based for loops.
We don't yet support this for the case where a range-based for loop is
implicitly rewritten to an ObjC for..in statement.

llvm-svn: 343350
2018-09-28 18:44:09 +00:00
Richard Smith 9b2c5e7c44 [cxx2a] P0641R2: (Some) type mismatches on defaulted functions only
render the function deleted instead of rendering the program ill-formed.

This change also adds an enabled-by-default warning for the case where
an explicitly-defaulted special member function of a non-template class
is implicitly deleted by the type checking rules. (This fires either due
to this language change or due to pre-C++20 reasons for the member being
implicitly deleted). I've tested this on a large codebase and found only
bugs (where the program means something that's clearly different from
what the programmer intended), so this is enabled by default, but we
should revisit this if there are problems with this being enabled by
default.

llvm-svn: 343285
2018-09-28 01:16:43 +00:00
Richard Smith 864949bda1 [cxx2a] P0624R2: Lambdas with no capture-default are
default-constructible and assignable.

llvm-svn: 343279
2018-09-27 22:47:04 +00:00
Richard Smith 79c88c3105 P1008R1 Classes with user-declared constructors are never aggregates in
C++20.

llvm-svn: 343131
2018-09-26 19:00:16 +00:00
Richard Smith 12938cf899 P0859R0: List-initialization is potentially-constant-evaluated and
triggers instantiation of constexpr functions.

We mostly implemented this since Clang 6, but missed the template
instantiation case.

We do not implement the '&cast-expression' special case. It appears to
be a mistake / oversight. I've mailed CWG to see if we can remove it.

llvm-svn: 343064
2018-09-26 04:36:55 +00:00
Richard Smith 5c9b3b7576 P0969R0: allow structured binding of accessible members, not only public members.
llvm-svn: 343036
2018-09-25 22:12:44 +00:00
Richard Smith e57418bb52 [www] Change 'Clang 7' items from yellow to green now Clang 7 is
released.

llvm-svn: 342927
2018-09-24 23:21:09 +00:00
Richard Smith d882704d36 [www] Update cxx_status to mark P0962R1 as done.
llvm-svn: 342926
2018-09-24 23:19:11 +00:00
Sylvestre Ledru 9ea1f3554d use the current url for bugzilla
llvm-svn: 342802
2018-09-22 07:41:09 +00:00
Sylvestre Ledru b06fe489aa update the links to use https
llvm-svn: 342801
2018-09-22 07:39:44 +00:00
Sylvestre Ledru 3461eae4a6 redirecting to llvm.org/devmtg
llvm-svn: 342568
2018-09-19 18:39:15 +00:00
Kristof Umann d6145d9849 [analyzer][UninitializedObjectChecker] New flag to ignore records based on it's fields
Based on a suggestion from @george.karpenkov.

In some cases, structs are used as unions with a help of a tag/kind field.
This patch adds a new string flag (a pattern), that is matched against the
fields of a record, and should a match be found, the entire record is ignored.

For more info refer to http://lists.llvm.org/pipermail/cfe-dev/2018-August/058906.html
and to the responses to that, especially http://lists.llvm.org/pipermail/cfe-dev/2018-August/059215.html.

Differential Revision: https://reviews.llvm.org/D51680

llvm-svn: 342220
2018-09-14 10:10:09 +00:00
Sylvestre Ledru 5c3457d79b Use Chrome and Firefox as example of success for clang
llvm-svn: 342216
2018-09-14 09:08:21 +00:00
Sylvestre Ledru 6831d0caf2 remove 11 years old videos from the homepage. if you have a suggestion, please drop me an email
llvm-svn: 342214
2018-09-14 09:00:48 +00:00
Sylvestre Ledru 89fc26466c update the doc to compare with gcc 4.9 instead of 4.2
llvm-svn: 342212
2018-09-14 08:55:09 +00:00
Sylvestre Ledru 83406f54d9 gcc is now returning the same output on this example, removing this example
llvm-svn: 342211
2018-09-14 08:52:18 +00:00
Richard Smith 0b2a541b90 [cxx_status] Use the correct color for a feature in "SVN" status
llvm-svn: 341110
2018-08-30 20:15:28 +00:00
Kristof Umann 2e4067226b [analyzer][UninitializedObjectChecker] Added documentation to the checker list
Differential Revision: https://reviews.llvm.org/D50904

llvm-svn: 340266
2018-08-21 10:47:19 +00:00
Erik Pilkington be168a9d34 [Sema] P0961R1: Relaxing the structured bindings customization point finding rules
Differential revision: https://reviews.llvm.org/D50418

llvm-svn: 339375
2018-08-09 20:11:13 +00:00
Richard Smith 1887819d08 [www] Update cxx_status and cxx_dr_status now that Clang 7 has branched.
llvm-svn: 338942
2018-08-04 01:02:00 +00:00
Mike Edwards 1cb062b041 [WWW] Fixing file permissions for the .html pages.
llvm-svn: 338098
2018-07-27 04:41:37 +00:00
Mike Edwards 2eb7a7a9a3 [WWW] Removing my test file as the auto-deployment script has been fixed.
llvm-svn: 338087
2018-07-26 23:29:54 +00:00
Mike Edwards f5d614c901 [WWW] Adding a test page to work out an auto-deployment issue.
llvm-svn: 338086
2018-07-26 23:23:40 +00:00
Bruno Cardoso Lopes 534f4e6dd0 [www] Add CodeCompass and CodeChecker to Clang Related Projects page
llvm-svn: 337555
2018-07-20 14:46:10 +00:00
Richard Smith d87aab939a Restructure checking for, and warning on, lifetime extension.
This change implements C++ DR1696, which makes initialization of a
reference member of a class from a temporary object ill-formed. The
standard wording here is imprecise, but we interpret it as meaning that
any time a mem-initializer would result in lifetime extension, the
program is ill-formed.

This reinstates r337226, reverted in r337255, with a fix for the
InitializedEntity alignment problem that was breaking ARM buildbots.

llvm-svn: 337329
2018-07-17 22:24:09 +00:00
Florian Hahn 0aa117dd2c Temporarily revert r337226 "Restructure checking for, and warning on, lifetime extension."
This change breaks on ARM because pointers to clang::InitializedEntity are only
4 byte aligned and do not have 3 bits to store values. A possible solution
would be to change the fields in clang::InitializedEntity to enforce a bigger
alignment requirement.

The error message is

llvm/include/llvm/ADT/PointerIntPair.h:132:3: error: static_assert failed "PointerIntPair with integer size too large for pointer"
  static_assert(IntBits <= PtrTraits::NumLowBitsAvailable,
include/llvm/ADT/PointerIntPair.h:73:13: note: in instantiation of template class 'llvm::PointerIntPairInfo<const clang::InitializedEntity *, 3, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *> >' requested here
    Value = Info::updateInt(Info::updatePointer(0, PtrVal),
llvm/include/llvm/ADT/PointerIntPair.h:51:5: note: in instantiation of member function 'llvm::PointerIntPair<const clang::InitializedEntity *, 3, (anonymous namespace)::LifetimeKind, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *>, llvm::PointerIntPairInfo<const clang::InitializedEntity *, 3, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *> > >::setPointerAndInt' requested here
    setPointerAndInt(PtrVal, IntVal);
    ^
llvm/tools/clang/lib/Sema/SemaInit.cpp:6237:12: note: in instantiation of member function 'llvm::PointerIntPair<const clang::InitializedEntity *, 3, (anonymous namespace)::LifetimeKind, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *>, llvm::PointerIntPairInfo<const clang::InitializedEntity *, 3, llvm::PointerLikeTypeTraits<const clang::InitializedEntity *> > >::PointerIntPair' requested here
    return {Entity, LK_Extended};

Full log here:
http://lab.llvm.org:8011/builders/clang-cmake-armv7-global-isel/builds/1330
http://lab.llvm.org:8011/builders/clang-cmake-armv7-full/builds/1394

llvm-svn: 337255
2018-07-17 09:23:31 +00:00
Richard Smith 0a9969b36b Restructure checking for, and warning on, lifetime extension.
This change implements C++ DR1696, which makes initialization of a
reference member of a class from a temporary object ill-formed. The
standard wording here is imprecise, but we interpret it as meaning that
any time a mem-initializer would result in lifetime extension, the
program is ill-formed.

llvm-svn: 337226
2018-07-17 00:11:41 +00:00
Richard Smith a3405ffcec DR330: look through array types when forming the cv-decomposition of a type.
This allows more qualification conversions, eg. conversion from
   'int *(*)[]' -> 'const int *const (*)[]'
is now permitted, along with all the consequences of that: more types
are similar, more cases are permitted by const_cast, and conversely,
fewer "casting away constness" cases are permitted by reinterpret_cast.

llvm-svn: 336745
2018-07-11 00:19:19 +00:00
Richard Smith 8a62ef0e1d [www] Update cxx_dr_status for recent DR fixes.
llvm-svn: 335782
2018-06-27 20:30:36 +00:00
Richard Smith 20eb9baa6d P0096R5, P0941R2: Update to match latest feature test macro specification.
llvm-svn: 334677
2018-06-14 00:40:20 +00:00
Richard Smith 3e3e2e9f82 [www] Update cxx_status page for Rapperswil motions.
llvm-svn: 334674
2018-06-14 00:05:28 +00:00
Richard Smith d9f2e0783a [www] Update C++ status to cover P0620.
While here, mark three-way comparison as in progress and bump "Clang 6" items from yellow to green.

llvm-svn: 333606
2018-05-30 23:30:36 +00:00
Artem Dergachev 8419cf307e [analyzer] Add security checks for bcmp(), bcopy(), bzero().
These functions are obsolete. The analyzer would advice to replace them with
memcmp(), memcpy() or memmove(), or memset().

Patch by Tom Rix!

Differential Revision: https://reviews.llvm.org/D41881

llvm-svn: 333326
2018-05-26 00:04:26 +00:00
Alexander Kornienko 2a8c18d991 Fix typos in clang
Found via codespell -q 3 -I ../clang-whitelist.txt
Where whitelist consists of:

  archtype
  cas
  classs
  checkk
  compres
  definit
  frome
  iff
  inteval
  ith
  lod
  methode
  nd
  optin
  ot
  pres
  statics
  te
  thru

Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few
files that have dubious fixes reverted.)

Differential revision: https://reviews.llvm.org/D44188

llvm-svn: 329399
2018-04-06 15:14:32 +00:00
Richard Smith b6070db0d0 DR1672, DR1813, DR1881, DR2120: Implement recent fixes to "standard
layout" rules.

The new rules say that a standard-layout struct has its first non-static
data member and all base classes at offset 0, and consider a class to
not be standard-layout if that would result in multiple subobjects of a
single type having the same address.

We track "is C++11 standard-layout class" separately from "is
standard-layout class" so that the ABIs that need this information can
still use it.

Differential Revision: https://reviews.llvm.org/D45176

llvm-svn: 329332
2018-04-05 18:55:37 +00:00
Yaron Keren 48baeb0e77 Remove reference to stale (2009) python version.
llvm-svn: 328447
2018-03-25 13:12:05 +00:00
Richard Smith 161ccb0e14 [cxx_status] Add entry for the Reflection TS.
llvm-svn: 327770
2018-03-17 14:34:21 +00:00
Richard Smith a14f320e38 [cxx_status] Update to match Jacksonville 2018 motions.
Also rearrange how we list DR motions: rather than listing them as part of some
later standard, list them against the feature they are a DR against. Explicitly
add a description of how we handle DRs.

llvm-svn: 327769
2018-03-17 14:28:47 +00:00
Richard Smith c660c8f5d2 Implement C++ DR727, which permits explicit specializations at class scope.
More generally, this permits a template to be specialized in any scope in which
it could be defined, so this also supersedes DR44 and DR374 (the latter of
which we previously only implemented in C++11 mode onwards due to unclarity as
to whether it was a DR).

llvm-svn: 327705
2018-03-16 13:36:56 +00:00
Richard Smith 3ecb3b868d Update DR script to mark Clang 6 as 'done' not 'svn'.
llvm-svn: 327546
2018-03-14 18:20:45 +00:00
Richard Smith c61361d994 [www] Update C++ DR status to match latest issues list.
llvm-svn: 327545
2018-03-14 18:19:41 +00:00
Richard Smith d9d42f9cc6 [www] Capitalize "Clang" when referring to the project, and generalize the
introduction on the front page page.

We still use the lowercase "clang" spelling when referring to the driver binary.

llvm-svn: 326493
2018-03-01 22:01:06 +00:00
Richard Smith c1a40220b4 Update cxx_status to mark "SVN" items as "Clang 6" instead.
llvm-svn: 326298
2018-02-28 03:02:07 +00:00
Devin Coughlin c0ffd637b9 [www] Update link to analyzer's "Building a Checker in 24 hours" video
The video is now uploaded to YouTube.

llvm-svn: 326062
2018-02-26 00:39:25 +00:00
Richard Smith 90c47cad22 [cxx_dr_status] Tests for CWG issues 641-687.
llvm-svn: 325475
2018-02-19 09:05:48 +00:00
Jonathan Roelofs 2f335af5c0 Fix typo. NFC
llvm-svn: 323864
2018-01-31 12:06:15 +00:00
Jonathan Roelofs 4a205fd038 [scan-build] Add an option to skip overriding CC and CXX make vars
Autoconf and some other systems tend to add essential compilation
options to CC (e.g. -std=gnu99). When running such an auto-generated
makefile, scan-build does not need to change CC and CXX as they are
already set to use ccc-analyzer by a configure script.

Implement a new option --keep-cc as was proposed in this discussion:
http://lists.llvm.org/pipermail/cfe-dev/2013-September/031832.html

Patch by Paul Fertser!

llvm-svn: 323665
2018-01-29 16:49:34 +00:00